package devdocs

class MessagingTagLib {

	def flashMessage = {
		attrs, body ->
		if (flash.message) {
			out << "<div id='msg'>"
			out << r.script() {
				out << "if (jQuery('.notice-item').length < 1) { jQuery.noticeAdd({text:'" + flash.message + "'}) }"
			}
			//out << "<script>if (jQuery('.notice-item').length < 1) { jQuery.noticeAdd({text:'" + flash.message + "'}) }</script>"
			out << "</div>"
		}
	}
}
